//=============================================================================
// SentinelNetwork - Communicates with other networked Sentinels.
//=============================================================================
class SentinelNetwork extends SentinelUpgrade;

//Tell other networked Sentinels that a new enemy has been targeted.
function NewTarget(Pawn NewEnemy)
{
	local Controller C;

	for(C = Level.ControllerList; C != None; C = C.NextController)
	{
		if(C.Pawn == None || C.Pawn.Health <= 0 || !C.Pawn.IsA('Sentinel'))
			continue;

		if(C == Sentinel.Controller || !C.SameTeamAs(Sentinel.Controller))
			continue;

		if(!Sentinel(C.Pawn).HasUpgrade(Class) || C.Enemy == NewEnemy)
			continue;

		C.SeePlayer(NewEnemy);
	}

	Super.NewTarget(NewEnemy);
}

defaultproperties
{
     AmmoCost=1
     UpgradeName="Network Interface"
     Description="Radio network link allowing Sentinels to form a local p2p network to coordinate their efforts. Quantum encryption ensures that hacking the network is as close to impossible as is theoretically possible.||Sentinel networks are most effective when one Sentinel is positioned and equipped to view a wide area from where it can alert slower Sentinels to bring the bulk of the collective firepower to bear on a target."
     ActivateSound=Sound'TFMedia.NetworkActivate'
}
